<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include/head::commonHeaderList('老师查看培训资料记录')">

</head>
<body>
<div id="content" class="col-lg-12 col-sm-12">
    <div class="row">
        <div class="box col-md-12" style="padding: 0;margin-top: 5px;">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>
                        <i class="glyphicon glyphicon-list"></i> <span th:text="${param.loginName}"></span>老师查看培训资料记录
                    </h2>
                    <div class="box-icon">
                        <a href="javascript:void(0);" id="smaller" class="btn btn-minimize btn-round btn-default"><i class="glyphicon glyphicon-chevron-up"></i></a>
                    </div>
                </div>
                <div class="box-content">
                    <form class="form-inline form-search " role="form" method="post" th:action="@{'/personCtl/tea/training/record/list'}">
                        <select class="selectpicker" name="listTeaId" multiple data-live-search="true" th:title="请选择老师" data-live-search-placeholder="搜索" data-actions-box="true">
                            <optgroup th:each="item:${listTea}" th:label="${item.levelName}">
                                <option th:each="oitem:${item.list}" th:value="${oitem.id}" th:selected="${listTeaId!=null && #lists.contains(listTeaId,oitem.id)}" th:text="${oitem.loginName}"></option>
                            </optgroup>
                        </select>
                        <select class="selectpicker" name="listFileName" multiple data-live-search="true" th:title="请选择文件" data-live-search-placeholder="搜索" data-actions-box="true">
                            <option th:each="item:${listFile}" th:value="${item}" th:selected="${listFileName!=null && #lists.contains(listFileName,item)}" th:text="${item}"></option>
                        </select>
                        <button type="submit" class="btn btn-primary" id="search" onclick="$('#pageNum').val(1)"> 查 询 </button>
                    </form>
                    <table class="table table-striped table-bordered table-hover footable" data-show-toggle="false">
                        <thead>
                        <tr>
                            <th class="text-center">序号</th>
                            <th class="text-center">老师名称</th>
                            <th class="text-center">培训资料名称</th>
                            <th class="text-center">观看次数</th>
                            <th class="text-center">最后一次观看时间</th>
                            <th class="text-center" data-breakpoints="all" data-title="历史观看记录时间">历史观看时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="item,itemStat:${pageInfo.list}">
                            <td class="text-center" th:utext="${itemStat.index+1}"></td>
                            <td class="text-center" th:text="${item.teacherLogin}"></td>
                            <td class="text-center" th:text="${item.fileName}"></td>
                            <td class="text-center" th:text="${item.num}"></td>
                            <td class="text-center" th:text="${#strings.contains(item.createTime,',')?#strings.substringBefore(item.createTime,','):item.createTime}"></td>
                            <td th:text="${#strings.contains(item.createTime,',')?#strings.substringAfter(item.createTime,','):''}"></td>
                        </tr>
                        </tbody>
                    </table>
                    <div th:include="include/pageinfo::pager"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include/onload_js::onloadJSCustomList(~{::script})">
    <script>
        $(function() {
            $('.footable').footable();
        })
    </script>

</div>
</body>
</html>